#coding=utf-8
#    测试  翼机通+  自动定时打卡。
#   
#
from appium import webdriver
import time 
desired_caps = {}
desired_caps['platformName'] = 'Android'
desired_caps['platformVersion'] = '4.4'
desired_caps['deviceName'] = 'Android Emulator'
desired_caps['appPackage'] = 'cn.yjt.oa.app'
desired_caps['appActivity'] = 'LaunchActivity'
desired_caps["unicodeKeyboard"] = "True"
desired_caps["resetKeyboard"] = "True"


driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
time.sleep(20)
driver.find_element_by_id("cn.yjt.oa.app:id/login_name").send_keys('15309180335')
time.sleep(2)
driver.find_element_by_id("cn.yjt.oa.app:id/password").send_keys("211111111")
time.sleep(2)
driver.find_element_by_id("cn.yjt.oa.app:id/login").click()
time.sleep(10)


driver.quit()
